package com.burns.java.io;

import java.io.File;

public class ShowAllFileInPath {

	public static int deep;//循环深度不超过5
	public static void main(String[] args) {
		File f = new File("D:"+File.separator+"学习"+File.separator+"android资源"+File.separator+"projects");
		print(f);
	}

	private static void print(File f) {
		if(f!=null){
			if(f.isDirectory()){
				File[] files = f.listFiles();
				if(files!=null){
					for (File file : files) {
						print(file);
					}
				}
			}else{
				System.out.println(f);
			}
		}
	}
}
